#!/usr/bin/env python3

class Student:
    def __init__(self, name, age, sex):
        self.name = name
        self.age = age
        self.sex = sex

    def say(self, ret=False):
        s = "%s %d %s" % (self.name, self.age, self.sex)
        if ret:
            return s
        print(s)

class BigStudent(Student):
    def __init__(self, name, age, sex, girl=None):
        super().__init__(name, age, sex)
        self.girl = girl

    def say(self):
        print("大学生: ", super().say(True), self.girl)

    def love(self):
        print("大学生都在谈恋爱")

class SmallStudent(Student):
    def play(self):
        print("小学生很会玩...")


def test(s):
    s.say()

def main():
    s = SmallStudent("张三", 10, '男')
    s.play()
    test(s)

    b = BigStudent("李四", 20, '男', '小花')
    b.love()
    test(b)

    print(SmallStudent.__mro__)
    print(BigStudent.__mro__)


if __name__ == "__main__":
    main()
